%
% NOOPMOBILITYSTRATEGYIMPL
%
% Autor: Pedro J. Martos Velasco
% Autor: Jorge Robles Ariza
%
classdef NoOpMobilityStrategyImpl < cdmapc.IMobilityStrategy
    
    properties (GetAccess = private, SetAccess = private)
        currentPosition
    end % properties
    
    methods (Access = public)
        
        %
        % Constructor
        %
        function [noOpMobilityStrategyImpl] = NoOpMobilityStrategyImpl(boundaries)
            if(nargin == 0)
                error('Deben proporcionarse las dimensiones rectangulares para delimitar el movimiento, en m');
            elseif(length(boundaries) ~= 4)
                error('La zona delimitada debe componerse de [xmin xmax ymin ymax]');
            end % if
            x = core.SRandomUtils.uniform(boundaries(2), boundaries(1));
            y = core.SRandomUtils.uniform(boundaries(4), boundaries(3));
            noOpMobilityStrategyImpl.currentPosition = [x y];
        end % function
        
        %
        % Destructor
        %
        function [] = delete(this)
            this.currentPosition = [];
        end % function
        
        function [newPosition] = move(this)
            newPosition = this.currentPosition;
        end % function
        
    end % methods
    
end % classdef
